#ifndef STRAY_GRAPHICS_DEVICE_H
#define STRAY_GRAPHICS_DEVICE_H

#include "../Object/ReferenceObject.h"
#include "../SmartPtr/IntrusivePtr.h"
#include "DeferredContext.h"
#include "FragmentProgram.h"
#include "IndexBuffer.h"
#include "VertexBuffer.h"
#include "VertexLayout.h"
#include "VertexProgram.h"
#include "Texture.h"

namespace Stray {
namespace Core {
namespace Graphics {

struct GraphicsParameter;

enum ProgramType
{
	PT_SOURCE,
	PT_OBJECT,
};

class Device : public Stray::ReferenceObject
{
public:
	virtual void reset() = 0;
	virtual void reset(const GraphicsParameter& param) = 0;

	virtual DeferredContextPtr createDeferredContex() = 0;

	//virtual FragmentProgramPtr createFragmentProgram(ProgramType programType, const Uint8 *program, const Uint8 *entry) = 0;
	virtual IndexBufferPtr createIndexBuffer(size_t bufferSize, IndexBufferFormat format = IBF_INDEX16) = 0;
	virtual VertexBufferPtr createVertexBuffer(size_t bufferSize) = 0;
	virtual VertexLayoutPtr createVertexLayout(const VertexLayoutTables& tables) = 0;
	//virtual VertexProgramPtr createVertexProgram(ProgramType programType, const Uint8 *program, const Uint8 *entry) = 0;
	virtual TexturePtr createTexture(const TextureDesc& desc) = 0;

};

typedef Stray::IntrusivePtr<Device>::type DevicePtr;

}
}
}

#endif